package a.f.g.a;

import a.c.e;
import a.c.k;
import a.c.w;
import a.c.x;
import a.f.o;

public class r
  extends m
{
  public static final Object a = "CoolDownCalculator.DP_KEY_COOL_DOWN_FACTOR";
  private double b;
  public static boolean c;
  
  public r(double paramDouble)
  {
    this.b = paramDouble;
  }
  
  public void a(d paramd)
  {
    super.a(paramd);
    paramd.i(new c_());
    paramd.f(new b_());
    paramd.c(new bc()
    {
      public void a(bb paramAnonymousbb, xb paramAnonymousxb)
      {
        o localo = paramAnonymousxb.m();
        k localk = localo.c(r.a);
        if (!xb.r)
        {
          if (localk == null) {
            return;
          }
          localo.a((x)localk);
        }
      }
    });
  }
  
  public double a()
  {
    return this.b;
  }
  
  public void a(double paramDouble)
  {
    this.b = paramDouble;
  }
  
  static class b_
    implements bc
  {
    public void a(bb parambb, xb paramxb)
    {
      int i = xb.q;
      o localo = paramxb.m();
      k localk = localo.c(r.a);
      if (localk == null) {
        return;
      }
      w localw = localo.v();
      do
      {
        if (!localw.e()) {
          break;
        }
        e locale = localw.d();
        xb.a_ locala_ = paramxb.d(locale);
        double d1 = locala_.g();
        double d2 = localk.getDouble(locale);
        locala_.e(d1 * (1.0D - d2));
        localw.f();
      } while (i == 0);
    }
  }
  
  class c_
    implements bc
  {
    private double a = 0.1D;
    
    c_() {}
    
    public void a(bb parambb, xb paramxb)
    {
      boolean bool = xb.r;
      int j = xb.q;
      if (r.this.b == 0.0D) {
        return;
      }
      o localo = paramxb.m();
      x localx = localo.B();
      localo.a(r.a, localx);
      a.c.bb[] arrayOfbb = a.a.m.a(localo);
      int i = 0;
      label141:
      label143:
      do
      {
        if (i >= arrayOfbb.length) {
          break;
        }
        a.c.bb localbb = arrayOfbb[i];
        w localw = localbb.l();
        do
        {
          if (!localw.e()) {
            break;
          }
          e locale = localw.d();
          localx.a(locale, a(localbb.size()));
          localw.f();
          if (bool) {
            break label143;
          }
          if (j != 0) {
            break label141;
          }
        } while (j == 0);
        if (!bool) {
          i++;
        }
      } while (j == 0);
    }
    
    double a(int paramInt)
    {
      double d = this.a / paramInt;
      if ((xb.r) || ((d < r.this.b) || (paramInt > 32))) {
        d = r.this.b;
      }
      System.out.println("returning factor " + d);
      return d;
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.g.a.r

 * JD-Core Version:    0.7.0.1

 */